<?php

namespace app\index\controller;

class Index
{
    public function index(): string
    {
        $rootPath = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR;
        if (is_file($rootPath . 'index.html')) {
            return file_get_contents($rootPath . 'index.html');
        } else {
            return 'Hello,world!';
        }
    }
}